 try{
	 
	 
	  function jsSelectItemByValue(objSelect_id,objItemText) {  
		  
		var objSelect=  document.getElementById(objSelect_id);
	        for(var i=0;i<objSelect.options.length;i++) {  
	            if(objSelect.options[i].value == objItemText) {  
	                objSelect.options[i].selected = true;  
	                break;  
	            }  
	        }  
	    }  
	function copyImg(controlId)
	{
	 
				var Url2=document.getElementById(controlId); 
			//	alert(Url2.src);
				controlRange = document.body.createControlRange(); 
			//	alert("a1");
				controlRange.addElement(Url2);
			//	alert("a2");
				controlRange.execCommand('Copy');  
	}
	 
	  function  submitConfirm(){
			// document.getElementsByName("submit").item(0).click();
			
			var code=document.getElementById('captcha').value;
		 	if(code.length==4)
		 	{
		 		if(confirm("验证码已经填写上了，需要提交吗"))
		 			document.getElementsByName("submit").item(0).click();//exit timer
		 	}else
		 			window.setTimeout(submitConfirm,4000);		 			
			
			}	
		
		
		function setAns(s)
		{
			//alert(s);
			try{ 
				  s=s.replace("=?","");
				   var rzt=eval(s);
				  document.getElementById('answer').value=rzt;	
			}catch(e)
			{
				//invok java prob lib solu
			}
			
			  
			//for invok raw check for can suto sumbit
			  checkanswer(rzt);
			 
			  //end
		}
	
	  document.getElementById('username').value='@username';
	  document.getElementById('company').value='@company';
	  document.getElementById('email').value='@email';
	  
	  
	  document.getElementById('password').value='@password';
	  document.getElementById('cpassword').value='@cpassword';
	  document.getElementById('truename').value='@truename';
	  document.getElementById('areaid_1').value='1';	
	  document.getElementById('type').value='1';
	  document.getElementById('telephone').value='@telephone';
	  jsSelectItemByValue("type","企业单位");	  
	  validator('email');// invok raw valid
	//  
	//  captcha
	   
	  
	// $("#username").value="aaa";
//	 alert($("#username").value);
 //   reloadquestion();
	//  showcaptcha();
//	  reloadcaptcha();
//	document.getElementById('password').value='000000';
	

	//auto setQuestAns 
	  function getQuest()
	  {
		//  window.clearInterval(int)
		  var s=  document.getElementById('questionstr').innerText;
	 
			if(s.length>0)
				{
				window.clearInterval(cyc_id);
				setAns(s);
			 
				}
				
		  
	  }
	var cyc_id=  window.setInterval(getQuest,2000);
	// captch png 
	  function crackCaptch()
	  {
		//  window.clearInterval(int)
	 
		  var img=  document.getElementById('captchapng');
			if( img.width>10)
				{
				window.clearInterval(crackCaptch_handle);
				 
			     copyImg("captchapng");
				 mycallJava("getCaptch");
				}
				
		  
	  }
	var crackCaptch_handle=  window.setInterval(crackCaptch,2000);
	
	

	
	//window.setTimeout(submitConfirm,4000);
	 
//	mycallJava("getCaptch");

 
	window.setTimeout(function(){
		// document.getElementsByName("submit").item(0).click();
		
	},1000);
	
	//window.setTimeout(function(){
	//	alert("start to pub");
		//window.location="http://localhost/destoon/member/my.php?mid=5&action=add&aP4=js";
	//},25000);
  
	 }catch(e)
	 {
		 
		// alert(e.number+":"+e.message+":"+e.lineNumber);
	 }